<%--
  Created by IntelliJ IDEA.
  User: JAVA
  Date: 2018/5/7
  Time: 16:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    int x=0;
    pageContext.setAttribute("a",10);
    request.setAttribute("b",20);
    session.setAttribute("c",30);
    application.setAttribute("d",40);
// //有了Student
//    Student chen=new Student();
//    chen.setId(1001);
//    chen.setName("chenli");
//    pageContext.setAttribute("chen",chen);//"chen"为变量，chen为值
%>
<!--pageContest-->request-->session-->application-->
<%--<p> a=${a}</p>--%>
<p>${chen.id}</p>
<p>${chen.username}</p>
<p>${chen.username}</p>
<hr/>
<p>${pageScope.a}</p>
<p>${requestScope.b}</p>
<p>${sessionScope.c}</p>
<p>${applicationScope.d}</p>
<hr/>
<p>${a}</p>
<p>${b}</p>
<p>${c}</p>
<p>${d}</p>
</body>
</html>
